n = int(input())
nums = list(map(int, input().split()))

if sum(nums) % 5 == 0:
    print("Yes")
else:
    print("No")
